package com.c2soft.nepalcmx.services;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.c2soft.nepalcmx.command.AccountDetailCommand;
import com.c2soft.nepalcmx.command.AccountUserCommand;
import com.c2soft.nepalcmx.command.BrokerFormCommand;
import com.c2soft.nepalcmx.dao.BrokerFormDAO;

@Service
public class BrokerFormService {
	
	@Autowired
	private BrokerFormDAO brokerFormDAO;

	public void registrationService(BrokerFormCommand registration) {
		brokerFormDAO.saveBrokerFormService(registration);
	}

	public void registrationUserService(BrokerFormCommand registration) {
		brokerFormDAO.saveUserFormService(registration);
	}
	
	public List<BrokerFormCommand> getUserForm(String brokerId) {
		
		return brokerFormDAO.findAllUserForm(brokerId);
	}

public List<BrokerFormCommand> getBrokerForm() {
		
		return brokerFormDAO.findAllBrokerForm();
	}

public List<BrokerFormCommand> getBrokerDetail(String brokerId) {
	return brokerFormDAO.findBroker(brokerId);

}

public void updateBrokerService(BrokerFormCommand user) {
	brokerFormDAO.updateBrokerDetailService(user);
}

public List<AccountUserCommand> getBrokersDetail(String brokerId) {
	
	return brokerFormDAO.findBrokerDetail(brokerId);
}

public List<AccountUserCommand> getExchangeDetail() {
	
	return brokerFormDAO.findExchangeDetail();
}


}
